from datetime import datetime
import math

# 国内交易开始年份
CHINA_STOCK_START_YEAR=1997
# 每年交易天数
CHINA_STOCK_DEAL_DAY_PER_YEAR=250
# 每天交易小时数
CHINA_STOCK_DEAL_HOUR_PER_DAY=4
# 当前年份
CURRENT_YEAR = datetime.now().year
# 上市交易年份
TOTAL_YEAR = (CURRENT_YEAR - CHINA_STOCK_START_YEAR + 1)
# 上市交易天数
TOTAL_DAY = TOTAL_YEAR * CHINA_STOCK_DEAL_DAY_PER_YEAR
# 上市交易分钟数
TOTAL_MIN = TOTAL_DAY * CHINA_STOCK_DEAL_HOUR_PER_DAY * 60

# 1分钟线数量 
CHINA_TOTAL_1MIN = TOTAL_MIN
# 5分钟线数量
CHINA_TOTAL_5MIN = math.ceil(TOTAL_MIN/5)
# 5分钟线数量
CHINA_TOTAL_15MIN = math.ceil(TOTAL_MIN/15)
# 30分钟线数量
CHINA_TOTAL_30MIN = math.ceil(TOTAL_MIN/30)
# 60分钟线数量
CHINA_TOTAL_60MIN = math.ceil(TOTAL_MIN/60)
# 日线数量
CHINA_TOTAL_1DAY = math.ceil(TOTAL_DAY)
# 周线数量
CHINA_TOTAL_1WEEK = math.ceil(TOTAL_YEAR * 52)
# 月线数量
CHINA_TOTAL_1MONTH = math.ceil(TOTAL_YEAR * 12)
# 季线数量
CHINA_TOTAL_1SEASON = math.ceil(TOTAL_YEAR * 4)
# 季线数量
CHINA_TOTAL_1YEAR = math.ceil(TOTAL_YEAR * 4)
